import 'package:flutter/material.dart';

void main() => runApp( MyApp());

///滑动删除模块
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHome(),
    );
  }
}

class MyHome extends StatefulWidget {
  const MyHome({super.key});

  @override
  State<MyHome> createState() => _MyHomeState();
}

class _MyHomeState extends State<MyHome> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Center(
            child: ClipPath(
              child: Image.asset('lib/assets/images/mine/mine2.jpg'),
              clipper: MyClipper(),
            ),

          ),
        ],
      )
    );
  }
}

class MyClipper extends CustomClipper<Path>{
  @override
  Path getClip(Size size) {
   var path = new Path();
   path.moveTo(size.width, 0.0);
   path.lineTo(size.width, size.height);
   path.lineTo(0,  size.height);
   path.close();
   return path;

  }

  @override
  bool shouldReclip(covariant CustomClipper<Path> oldClipper) {
    return false;
  }
}
